<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxMeshQuery Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classPxMeshQuery.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classPxMeshQuery-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxMeshQuery Class Reference<div class="ingroups"><a class="el" href="group__geomutils.html">Geomutils</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="PxMeshQuery_8h_source.html">PxMeshQuery.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac567bb759621105f07886f257587d70f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxMeshQuery.html#ac567bb759621105f07886f257587d70f">getTriangle</a> (const <a class="el" href="classPxTriangleMeshGeometry.html">PxTriangleMeshGeometry</a> &amp;triGeom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;transform, <a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a> triangleIndex, <a class="el" href="classPxTriangle.html">PxTriangle</a> &amp;triangle, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *vertexIndices=NULL, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *adjacencyIndices=NULL)</td></tr>
<tr class="memdesc:ac567bb759621105f07886f257587d70f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves triangle data from a triangle ID.  <a href="#ac567bb759621105f07886f257587d70f">More...</a><br /></td></tr>
<tr class="separator:ac567bb759621105f07886f257587d70f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8acb2a510cda8105fe1d9f84acf20087"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxMeshQuery.html#a8acb2a510cda8105fe1d9f84acf20087">getTriangle</a> (const <a class="el" href="classPxHeightFieldGeometry.html">PxHeightFieldGeometry</a> &amp;hfGeom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;transform, <a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a> triangleIndex, <a class="el" href="classPxTriangle.html">PxTriangle</a> &amp;triangle, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *vertexIndices=NULL, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *adjacencyIndices=NULL)</td></tr>
<tr class="memdesc:a8acb2a510cda8105fe1d9f84acf20087"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves triangle data from a triangle ID.  <a href="#a8acb2a510cda8105fe1d9f84acf20087">More...</a><br /></td></tr>
<tr class="separator:a8acb2a510cda8105fe1d9f84acf20087"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea451debbcaca51f9f1f49df3d5bfe74"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxMeshQuery.html#aea451debbcaca51f9f1f49df3d5bfe74">findOverlapTriangleMesh</a> (const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;geomPose, const <a class="el" href="classPxTriangleMeshGeometry.html">PxTriangleMeshGeometry</a> &amp;meshGeom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;meshPose, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *results, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> maxResults, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> startIndex, bool &amp;overflow)</td></tr>
<tr class="memdesc:aea451debbcaca51f9f1f49df3d5bfe74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the mesh triangles which touch the specified geometry object.  <a href="#aea451debbcaca51f9f1f49df3d5bfe74">More...</a><br /></td></tr>
<tr class="separator:aea451debbcaca51f9f1f49df3d5bfe74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a461e1f01530df9d99e0762ca20493c2d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxMeshQuery.html#a461e1f01530df9d99e0762ca20493c2d">findOverlapHeightField</a> (const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;geomPose, const <a class="el" href="classPxHeightFieldGeometry.html">PxHeightFieldGeometry</a> &amp;hfGeom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;hfPose, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *results, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> maxResults, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> startIndex, bool &amp;overflow)</td></tr>
<tr class="memdesc:a461e1f01530df9d99e0762ca20493c2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the height field triangles which touch the specified geometry object.  <a href="#a461e1f01530df9d99e0762ca20493c2d">More...</a><br /></td></tr>
<tr class="separator:a461e1f01530df9d99e0762ca20493c2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae35a79d58b3c90dbaefe7d204bbfc9b5"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxMeshQuery.html#ae35a79d58b3c90dbaefe7d204bbfc9b5">sweep</a> (const <a class="el" href="classPxVec3.html">PxVec3</a> &amp;unitDir, const PxReal distance, const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;geom, const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;pose, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> triangleCount, const <a class="el" href="classPxTriangle.html">PxTriangle</a> *triangles, <a class="el" href="structPxSweepHit.html">PxSweepHit</a> &amp;sweepHit, PxHitFlags hitFlags=<a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64afbdec54374d753fed4682d855aac7270">PxHitFlag::eDEFAULT</a>, const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *cachedIndex=NULL, const PxReal inflation=0.0f, bool doubleSided=false)</td></tr>
<tr class="memdesc:ae35a79d58b3c90dbaefe7d204bbfc9b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sweep a specified geometry object in space and test for collision with a set of given triangles.  <a href="#ae35a79d58b3c90dbaefe7d204bbfc9b5">More...</a><br /></td></tr>
<tr class="separator:ae35a79d58b3c90dbaefe7d204bbfc9b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a461e1f01530df9d99e0762ca20493c2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a461e1f01530df9d99e0762ca20493c2d">&#9670;&nbsp;</a></span>findOverlapHeightField()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> PxMeshQuery::findOverlapHeightField </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>geom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>geomPose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxHeightFieldGeometry.html">PxHeightFieldGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>hfGeom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>hfPose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>results</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>maxResults</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>startIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>overflow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find the height field triangles which touch the specified geometry object. </p>
<p>Returned triangle indices can be used with <a class="el" href="classPxMeshQuery.html#ac567bb759621105f07886f257587d70f" title="Retrieves triangle data from a triangle ID. ">getTriangle()</a> to retrieve the triangle properties.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">geom</td><td>The geometry object to test for height field overlaps. Supported geometries are <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere. ">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule. ">PxCapsuleGeometry</a> and <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box. ">PxBoxGeometry</a>. The sphere and capsule queries are currently conservative estimates. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">geomPose</td><td>Pose of the geometry object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hfGeom</td><td>The height field geometry to check overlap against </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hfPose</td><td>Pose of the height field </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">results</td><td>Indices of overlapping triangles </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">maxResults</td><td>Size of 'results' buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">startIndex</td><td>Index of first result to be retrieved. Previous indices are skipped. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">overflow</td><td>True if a buffer overflow occurred </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of overlaps found, i.e. number of elements written to the results buffer</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxHeightFieldGeometry.html" title="Height field geometry class. ">PxHeightFieldGeometry</a> <a class="el" href="classPxMeshQuery.html#ac567bb759621105f07886f257587d70f" title="Retrieves triangle data from a triangle ID. ">getTriangle()</a> </dd></dl>

</div>
</div>
<a id="aea451debbcaca51f9f1f49df3d5bfe74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea451debbcaca51f9f1f49df3d5bfe74">&#9670;&nbsp;</a></span>findOverlapTriangleMesh()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> PxMeshQuery::findOverlapTriangleMesh </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>geom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>geomPose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTriangleMeshGeometry.html">PxTriangleMeshGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>meshGeom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>meshPose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>results</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>maxResults</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>startIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>overflow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find the mesh triangles which touch the specified geometry object. </p>
<p>Returned triangle indices can be used with <a class="el" href="classPxMeshQuery.html#ac567bb759621105f07886f257587d70f" title="Retrieves triangle data from a triangle ID. ">getTriangle()</a> to retrieve the triangle properties.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">geom</td><td>The geometry object to test for mesh triangle overlaps. Supported geometries are <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere. ">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule. ">PxCapsuleGeometry</a> and <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box. ">PxBoxGeometry</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">geomPose</td><td>Pose of the geometry object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">meshGeom</td><td>The triangle mesh geometry to check overlap against </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">meshPose</td><td>Pose of the triangle mesh </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">results</td><td>Indices of overlapping triangles </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">maxResults</td><td>Size of 'results' buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">startIndex</td><td>Index of first result to be retrieved. Previous indices are skipped. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">overflow</td><td>True if a buffer overflow occurred </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of overlaps found, i.e. number of elements written to the results buffer</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class. ">PxTriangleMeshGeometry</a> <a class="el" href="classPxMeshQuery.html#ac567bb759621105f07886f257587d70f" title="Retrieves triangle data from a triangle ID. ">getTriangle()</a> </dd></dl>

</div>
</div>
<a id="ac567bb759621105f07886f257587d70f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac567bb759621105f07886f257587d70f">&#9670;&nbsp;</a></span>getTriangle() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> void PxMeshQuery::getTriangle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPxTriangleMeshGeometry.html">PxTriangleMeshGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>triGeom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a>&#160;</td>
          <td class="paramname"><em>triangleIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classPxTriangle.html">PxTriangle</a> &amp;&#160;</td>
          <td class="paramname"><em>triangle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>vertexIndices</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>adjacencyIndices</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieves triangle data from a triangle ID. </p>
<p>This function can be used together with <a class="el" href="classPxMeshQuery.html#aea451debbcaca51f9f1f49df3d5bfe74" title="Find the mesh triangles which touch the specified geometry object. ">findOverlapTriangleMesh()</a> to retrieve triangle properties.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">triGeom</td><td>Geometry of the triangle mesh to extract the triangle from. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">transform</td><td>Transform for the triangle mesh </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">triangleIndex</td><td>The index of the triangle to retrieve. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">triangle</td><td>Triangle points in world space. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">vertexIndices</td><td>Returned vertex indices for given triangle </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">adjacencyIndices</td><td>Returned 3 triangle adjacency internal face indices (0xFFFFFFFF if no adjacency). The mesh must be cooked with cooking param buildTriangleAdjacencies enabled.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxTriangle.html" title="Triangle class. ">PxTriangle</a> PxTriangleFlags <a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a> <a class="el" href="classPxMeshQuery.html#aea451debbcaca51f9f1f49df3d5bfe74" title="Find the mesh triangles which touch the specified geometry object. ">findOverlapTriangleMesh()</a> </dd></dl>

</div>
</div>
<a id="a8acb2a510cda8105fe1d9f84acf20087"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8acb2a510cda8105fe1d9f84acf20087">&#9670;&nbsp;</a></span>getTriangle() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> void PxMeshQuery::getTriangle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPxHeightFieldGeometry.html">PxHeightFieldGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>hfGeom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a>&#160;</td>
          <td class="paramname"><em>triangleIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classPxTriangle.html">PxTriangle</a> &amp;&#160;</td>
          <td class="paramname"><em>triangle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>vertexIndices</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>adjacencyIndices</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieves triangle data from a triangle ID. </p>
<p>This function can be used together with <a class="el" href="classPxMeshQuery.html#a461e1f01530df9d99e0762ca20493c2d" title="Find the height field triangles which touch the specified geometry object. ">findOverlapHeightField()</a> to retrieve triangle properties.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hfGeom</td><td>Geometry of the height field to extract the triangle from. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">transform</td><td>Transform for the height field. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">triangleIndex</td><td>The index of the triangle to retrieve. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">triangle</td><td>Triangle points in world space. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">vertexIndices</td><td>Returned vertex indices for given triangle </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">adjacencyIndices</td><td>Returned 3 triangle adjacency triangle indices (0xFFFFFFFF if no adjacency).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true. </dd>
<dd>
TriangleIndex is an index used in internal format, which does have an index out of the bounds in last row. To traverse all tri indices in the HF, the following code can be applied: for (PxU32 row = 0; row &lt; (nbRows - 1); row++) { for (PxU32 col = 0; col &lt; (nbCols - 1); col++) { for (PxU32 k = 0; k &lt; 2; k++) { const PxU32 triIndex = 2 * (row*nbCols + col) + k; .... } } } </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxTriangle.html" title="Triangle class. ">PxTriangle</a> PxTriangleFlags <a class="el" href="group__common.html#ga19403877bf7ce42d7240e4e4c758c016">PxTriangleID</a> <a class="el" href="classPxMeshQuery.html#a461e1f01530df9d99e0762ca20493c2d" title="Find the height field triangles which touch the specified geometry object. ">findOverlapHeightField()</a> </dd></dl>

</div>
</div>
<a id="ae35a79d58b3c90dbaefe7d204bbfc9b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae35a79d58b3c90dbaefe7d204bbfc9b5">&#9670;&nbsp;</a></span>sweep()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__common.html#ga87ae1d60bdf83754e2fe5065aab40ec4">PX_PHYSX_COMMON_API</a> bool PxMeshQuery::sweep </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPxVec3.html">PxVec3</a> &amp;&#160;</td>
          <td class="paramname"><em>unitDir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PxReal&#160;</td>
          <td class="paramname"><em>distance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxGeometry.html">PxGeometry</a> &amp;&#160;</td>
          <td class="paramname"><em>geom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTransform.html">PxTransform</a> &amp;&#160;</td>
          <td class="paramname"><em>pose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>triangleCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxTriangle.html">PxTriangle</a> *&#160;</td>
          <td class="paramname"><em>triangles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structPxSweepHit.html">PxSweepHit</a> &amp;&#160;</td>
          <td class="paramname"><em>sweepHit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PxHitFlags&#160;</td>
          <td class="paramname"><em>hitFlags</em> = <code><a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64afbdec54374d753fed4682d855aac7270">PxHitFlag::eDEFAULT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> *&#160;</td>
          <td class="paramname"><em>cachedIndex</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PxReal&#160;</td>
          <td class="paramname"><em>inflation</em> = <code>0.0f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>doubleSided</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sweep a specified geometry object in space and test for collision with a set of given triangles. </p>
<p>This function simply sweeps input geometry against each input triangle, in the order they are given. This is an O(N) operation with N = number of input triangles. It does not use any particular acceleration structure.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">unitDir</td><td>Normalized direction of the sweep. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">distance</td><td>Sweep distance. Needs to be larger than 0. Clamped to PX_MAX_SWEEP_DISTANCE. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">geom</td><td>The geometry object to sweep. Supported geometries are <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere. ">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule. ">PxCapsuleGeometry</a> and <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box. ">PxBoxGeometry</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pose</td><td>Pose of the geometry object to sweep. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">triangleCount</td><td>Number of specified triangles </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">triangles</td><td>Array of triangles to sweep against </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sweepHit</td><td>The sweep hit information. See the notes below for limitations about returned results. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hitFlags</td><td>Specification of the kind of information to retrieve on hit. Combination of <a class="el" href="structPxHitFlag.html" title="Scene query and geometry query behavior flags. ">PxHitFlag</a> flags. See the notes below for limitations about supported flags. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cachedIndex</td><td>Cached triangle index for subsequent calls. Cached triangle is tested first. Optional parameter. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">inflation</td><td>This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">doubleSided</td><td>Counterpart of <a class="el" href="structPxMeshGeometryFlag.html#aa4f762855200599fc014b0654f7ce2c9ae50426f8f858ae161427c24276eb3014">PxMeshGeometryFlag::eDOUBLE_SIDED</a> for input triangles. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the swept geometry object hits the specified triangles</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Only the following geometry types are currently supported: <a class="el" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere. ">PxSphereGeometry</a>, <a class="el" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule. ">PxCapsuleGeometry</a>, <a class="el" href="classPxBoxGeometry.html" title="Class representing the geometry of a box. ">PxBoxGeometry</a> </dd>
<dd>
If a shape from the scene is already overlapping with the query shape in its starting position, the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified. </dd>
<dd>
This function returns a single closest hit across all the input triangles. Multiple hits are not supported. </dd>
<dd>
Supported hitFlags are <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64afbdec54374d753fed4682d855aac7270">PxHitFlag::eDEFAULT</a>, <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64a7ec4e2f321d4fe4e3d02c4e4b532cc9b">PxHitFlag::eASSUME_NO_INITIAL_OVERLAP</a>, <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64af903d9ed69a9b2d397ca289752aaeef1">PxHitFlag::ePRECISE_SWEEP</a>, <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64aaff8ff06630f9388c0ff8f20b7bbd9d3">PxHitFlag::eMESH_BOTH_SIDES</a>, <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64a639d134a27861f74e3721dbd7be65bbc">PxHitFlag::eMESH_ANY</a>. </dd>
<dd>
ePOSITION is only defined when there is no initial overlap (sweepHit.hadInitialOverlap() == false) </dd>
<dd>
The returned normal for initially overlapping sweeps is set to -unitDir. </dd>
<dd>
Otherwise the returned normal is the front normal of the triangle even if <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64aaff8ff06630f9388c0ff8f20b7bbd9d3">PxHitFlag::eMESH_BOTH_SIDES</a> is set. </dd>
<dd>
The returned <a class="el" href="structPxQueryHit.html#ae3462529024eafa98ed2abe1b3b9146c">PxSweepHit::faceIndex</a> parameter will hold the index of the hit triangle in input array, i.e. the range is [0; triangleCount). For initially overlapping sweeps, this is the index of overlapping triangle. </dd>
<dd>
The returned <a class="el" href="structPxActorShape.html#a0d8da15967ebaee8935725195bbd509a">PxSweepHit::actor</a> and <a class="el" href="structPxActorShape.html#aee7fb87ffc62391b2968ce8f954416f7">PxSweepHit::shape</a> pointers are not filled. </dd>
<dd>
The inflation parameter is not compatible with <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64af903d9ed69a9b2d397ca289752aaeef1">PxHitFlag::ePRECISE_SWEEP</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxTriangle.html" title="Triangle class. ">PxTriangle</a> <a class="el" href="structPxSweepHit.html" title="Stores results of sweep queries. ">PxSweepHit</a> <a class="el" href="classPxGeometry.html" title="A geometry object. ">PxGeometry</a> <a class="el" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector ">PxTransform</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxMeshQuery_8h_source.html">PxMeshQuery.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classPxMeshQuery.html">PxMeshQuery</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
